package com.cn.gmall.client;

import com.cn.gmall.client.impl.CartDegradeFeignClient;
import com.cn.gmall.model.cart.CartInfo;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
@FeignClient(value = "service-cart",fallback = CartDegradeFeignClient.class)
public interface CartFeignClient {
    /**
     * 获取选中状态的购物车列表
     *   /api/cart/getCartCheckedList/{userId}
     * @param userId
     * @return
     */

    @GetMapping("/api/cart/getCartCheckedList/{userId}")
    public List<CartInfo> getCartCheckedList(@PathVariable String userId);
}
